import * as React from 'react'
import classNames from 'classnames'
import { Col } from 'antd'
import * as style from './index.less'
import responsive from './responsive'

const Description = ({ term, column, className, children, ...restProps }: any) => {
  const clsString = classNames('description', className)
  return (
    <Col className={clsString} {...responsive[column]} {...restProps}>
      {term && <div className={style.term}>{term}</div>}
      {children !== null &&
        children !== undefined && <div className={style.detail}>{children}</div>}
    </Col>
  )
}
export default Description